package cn.hj.basic.util;

import lombok.Data;

@Data
public class AjaxResult {
    //是否成功
    private  Boolean success = true;
    //给用户返回一个状态
    private  String Message = "操作成功";

    private Object resultObj;


    public AjaxResult setSuccess(Boolean success) {
        this.success = success;
        return this;
    }

    public  AjaxResult setMessage(String Message) {
        this.Message =Message;
        return this;
    }

    public AjaxResult setResultObj(Object resultObj) {
        this.resultObj = resultObj;
        return this;
    }

    public static  AjaxResult newAjaxResult(){
        return new AjaxResult();
    }

}
